package com.xxx.host;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.profile.HttpProfile;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;

import com.tencentcloudapi.yunjing.v20180228.YunjingClient;

import com.tencentcloudapi.yunjing.v20180228.models.DescribeVulInfoRequest;
import com.tencentcloudapi.yunjing.v20180228.models.DescribeVulInfoResponse;

public class DescribeVulInfo//获取漏洞详情
{
    public static void main(String [] args) {
        try{

            Credential cred = new Credential("AKIDUnsFb9FgYdWtthycgUYO3dBXMzLXpkhR", "rY2oN5XlmoW1oNRJwLceSVL1Un7Geuym");
            
            HttpProfile httpProfile = new HttpProfile();
            httpProfile.setEndpoint("yunjing.tencentcloudapi.com");

            ClientProfile clientProfile = new ClientProfile();
            clientProfile.setHttpProfile(httpProfile);            
            
            YunjingClient client = new YunjingClient(cred, "ap-chengdu", clientProfile);
            
            String params = "{\"VulId\":1001}";
            DescribeVulInfoRequest req = DescribeVulInfoRequest.fromJsonString(params,DescribeVulInfoRequest.class);
            
            DescribeVulInfoResponse resp = client.DescribeVulInfo(req);
            
            System.out.println(DescribeVulInfoRequest.toJsonString(resp));
        } catch (TencentCloudSDKException e) {
                System.out.println(e.toString());
        }

    }
    
}